home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 December
/
Ahoy_Magazine_85-12_1985_Double_L.d64
/
c64 cloak
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
54 lines
100 mp=828:key=882:by=254:tl=13776:cs=0
102 print"[147]data cloak"
104 read k:ifk<0then108
106 cs=cs+k:pokemp,k:mp=mp+1:goto104
108 if cs<>tl thenprint"error="cs:goto154
110 print"okay":syskey:key=key-1
112 print"encryption key":input ky$:ifky$=""then154
114 print"source filename":input n1$:ifn1$=""then154
116 print"file type (p/s/u)":input sf$:ifsf$=""thensf$="p"
118 print"new filename":input n2$:ifn2$=""then154
120 print"file type (p/s/u)":input nf$:ifnf$=""thennf$="p"
122 sf$=","+left$(sf$,1)+",r":nf$=","+left$(nf$,1)+",w"
124 n1$="0:"+left$(n1$,16)+sf$:n2$="0:"+left$(n2$,16)+nf$
126 print"opening ";n1$:open15,8,15,"i"
128 open2,8,2,n1$:gosub158:printdk$:iferthen154
130 print"opening ";n2$
132 open 3,8,3,n2$:gosub158:printdk$:iferthen154
134 forlp=1tolen(ky$):pokekey+lp,asc(mid$(ky$,lp,1)):nextlp
136 pokekey+lp,0:print"crypting wait"
138 er=1
140 get#2,q$:if status and 64 thener=0
142 k=0:ifq$=""then146
144 k=asc(q$)
146 pokeby,k:sys828:k=peek(by)
148 print#3,chr$(k);:iferthen140
150 gosub158:printdk$:iferthen154
152 print" all done."
154 close2:close3:close15:end
156 rem disk errors
158 er=0:input#15,e1,e2$,e3,e4
160 dk$=str$(e1)+chr$(32)+e2$
162 ife1>20thener=1:dk$=chr$(18)+dk$
164 return
166 data 222,135,090,041,121
168 data 063,132,255,132,178
170 data 203,129,179,122,138
172 data 121,254,135,026,210
174 data 054,054,121,203,129
176 data 112,234,120,051,103
178 data 235,129,026,211,070
180 data 255,129,211,121,255
182 data 134,211,122,210,235
184 data 129,178,186,086,170
186 data 131,054,152,134,169
188 data 093,141,002,003,169
190 data 003,141,003,003,169
192 data 060,133,251,169,003
194 data 133,252,160,000,132
196 data 253,177,251,073,122
198 data 145,251,200,192,054
200 data 208,245,169,114,133
202 data 251,169,003,133,252
204 data 096,255,-7